package cn.yangliu.nacos.management.entity.oauth2;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Table;

import lombok.Data;

/**
 * The type of nacos.
 *
 * @author 问道于盲
 * @date 2020 -01-01
 */
@Entity
@Table(name = "oauth2_client_role")
@Data
public class Oauth2Client2Role {

    /**
     * current class instance's member.
     * The Id.
     */
    @EmbeddedId
    private Oauth2Client2RoleKey id;

    /**
     * The interface Oauth 2 client 2 role key.
     *
     * @author 问道于盲
     */
    @Embeddable
    @Data
    public static class Oauth2Client2RoleKey implements Serializable {

        /**
         * current class instance's member.
         * The Client id.
         */
        @Column(name = "client_id")
        private Long clientId;

        /**
         * current class instance's member.
         * The Role id.
         */
        @Column(name = "role_id")
        private Long roleId;
    }
}
